import request from '@/utils/request'

// 获取第一权限的所有信息
export function getAllAddressList() {
  return request({
    'url': '/address/getAllAddressList',
    'method': 'post',
  })
}
// 获取二级管理员辖区列表
export function getSecondAddressList(addressList) {
  const data = {
   addressList
  }
  return request({
    'url': '/address/getSecondAddressList',
    'method': 'post',
    'data': data
  })
}
// 请求获取地图点位
export function getMapIcon(greenIcon,yellowIcon,redIcon,addressList) {
  const data = {
        greenIcon,
        yellowIcon,
        redIcon,
        addressList
  }
  return request({
    'url': '/address/getMapIcon',
    'method': 'post',
    'data': data
  })
}
//  获取详细事件地图标点
export function getDetailMapIcon(greenIcon) {
  const data = {
    greenIcon
  }
  return request({
    'url': '/address/getAdviseMapIcon',
    'method': 'get',
    'data': data
  })
}
// 获取辖区信息
export function getAddressInfo(id) {
  const data = {
   id
  }
  return request({
    'url': '/address/getAddressInfo',
    'method': 'post',
    'data': data
  })
}


export function searchAddressList(address) {
  const data = {
   address
  }
  return request({
    'url': '/address/searchAddressList',
    'method': 'post',
    'data': data
  })
}
 
 // 获取一级辖区列表
export function getFirstAddress() {
  return request({
    'url': '/address/getFirstAddressList',
    'method': 'post',
  })
}
 // 获取二级辖区列表
export function getSecondAddress(id) {
  const data = {
   id
  }
  return request({
    'url': '/address/getSecondAddressListByFid',
    'method': 'post',
    'data': data
  })
}
